package com.tongshu.miaosha.utils;

import org.apache.commons.lang3.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ValidatorUtil {
    private static final Pattern mobile_pattern = Pattern.compile("1\\d{10}");

    // 正则判断是否是有效手机号
    public static boolean isMobile(String src) {
        if (StringUtils.isEmpty(src))
            return false;
        Matcher m = mobile_pattern.matcher(src);
        return m.matches();
    }
}
